package com.springvn.sample.services;

import java.util.List;

import com.googlecode.genericdao.search.ISearch;
import com.googlecode.genericdao.search.SearchResult;
import com.springvn.sample.persistence.Employee2;

public interface IEmployeeService2 {
	/**
	 * CRUD
	 * @param employee
	 */
	public void addEmployee(Employee2 employee);
    public List<Employee2> getAllEmployees();
    public void deleteEmployee(Integer employeeId);
    
    /**
     * 
     * @param search
     * @return
     */
    public List<Employee2> search(ISearch search);

	public SearchResult<Employee2> searchAndCount(ISearch search);

	public Employee2 findById(Integer id);

	public Employee2 findByName(String name);

	public void flush();
    
}
